package com.example.xxpk.common.ex;

import com.example.xxpk.common.enums.ResultInterface;

public class UserValidatorException extends RuntimeException {

    private Integer code;
    private String msg;

    private  UserValidatorException(Integer code ,String msg) {
        super(msg);
        this.code = code;
        this.msg = msg;
    }

    public  UserValidatorException(ResultInterface adminResultInterface) {
        super(adminResultInterface.getMsg());
        this.code = adminResultInterface.getCode();
        this.msg = adminResultInterface.getMsg();
    }

    public Integer getCode() {
        return code;
    }

    public void setCode(Integer code) {
        this.code = code;
    }

    public String getMsg() {
        return msg;
    }

    public void setMsg(String msg) {
        this.msg = msg;
    }
}
